package com.cysoft.opensource.okhttp.response;

import android.os.Handler;
import android.os.Looper;

import androidx.annotation.NonNull;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

public class CommonCallBack implements Callback {
    private static final String TAG = "CommonCallback";

    protected final int NETWORK_ERROR = -1;
    protected final int JSON_ERROR = -2;
    protected final int OTHER_ERROR = -3;

    private Class<?> mClass;
    private Handler mDeliverHandler;
    private String mFilePath;

    public CommonCallBack() {
        this.mDeliverHandler = new Handler(Looper.getMainLooper());
    }

    @Override
    public void onFailure(@NonNull Call call, @NonNull IOException e) {
        mDeliverHandler.post(new Runnable() {
            @Override
            public void run() {
//                mListener.onFailure(e);
            }
        });
    }

    @Override
    public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {

    }
}
